package chixing.day10.singleton;

/**
 * 懒汉单例模式
 */
public class B {
    private static B b;

    public B() {
    }

    public static B getInstance(){
        if (b == null)
            return b = new B();
        return b;
    }

}
